package com.deductive.domain.wq;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 作战编组表
 * @TableName disposition_wq_zzbz
 */
@TableName(value ="disposition_wq_zzbz")
@Data
public class DispositionWqZzbz implements Serializable {
    /**
     * id
     */
    @TableId(value = "id",type= IdType.AUTO)
    private Integer id;

    /**
     * 名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 所属单位
     */
    @TableField(value = "affiliated_unit")
    private String affiliatedUnit;

    /**
     * 作战人数
     */
    @TableField(value = "warfare_people")
    private String warfarePeople;

    /**
     * 父节点id
     */
    @TableField(value = "parent_node_id")
    private String parentNodeId;

    /**
     * 关联想定
     */
    @TableField(value = "related_scenario")
    private String relatedScenario;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DispositionWqZzbz other = (DispositionWqZzbz) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getAffiliatedUnit() == null ? other.getAffiliatedUnit() == null : this.getAffiliatedUnit().equals(other.getAffiliatedUnit()))
            && (this.getWarfarePeople() == null ? other.getWarfarePeople() == null : this.getWarfarePeople().equals(other.getWarfarePeople()))
            && (this.getParentNodeId() == null ? other.getParentNodeId() == null : this.getParentNodeId().equals(other.getParentNodeId()))
            && (this.getRelatedScenario() == null ? other.getRelatedScenario() == null : this.getRelatedScenario().equals(other.getRelatedScenario()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getAffiliatedUnit() == null) ? 0 : getAffiliatedUnit().hashCode());
        result = prime * result + ((getWarfarePeople() == null) ? 0 : getWarfarePeople().hashCode());
        result = prime * result + ((getParentNodeId() == null) ? 0 : getParentNodeId().hashCode());
        result = prime * result + ((getRelatedScenario() == null) ? 0 : getRelatedScenario().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", affiliatedUnit=").append(affiliatedUnit);
        sb.append(", warfarePeople=").append(warfarePeople);
        sb.append(", parentNodeId=").append(parentNodeId);
        sb.append(", relatedScenario=").append(relatedScenario);
        sb.append(", remark=").append(remark);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}